[md PATCH 33/34] MD: raid1s/sysfs_notify_dirent/sysfs_notify_dirent_safe

From: Jonathan Brassow <jbrassow [at] redhat.com>

If device-mapper creates a RAID1 array that includes devices to
be rebuilt, it will deref a NULL pointer when finished because
sysfs is not used by device-mapper instantiated RAID devices.

Signed-off-by: Jonathan Brassow <jbrassow [at] redhat.com>
Signed-off-by: NeilBrown <neilb [at] suse.de>
---

drivers/md/raid1.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index a7e6908..3cbf0ac 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
[at] [at] -1031,7 +1031,7 [at] [at] static int raid1_spare_active(mddev_t *mddev)
&& !test_bit(Faulty, &rdev->flags)
&& !test_and_set_bit(In_sync, &rdev->flags)) {
count++;
- sysfs_notify_dirent(rdev->sysfs_state);
+ sysfs_notify_dirent_safe(rdev->sysfs_state);
}
}
spin_lock_irqsave(&conf->device_lock, flags);


--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
NeilBrown [ Do, 21 Juli 2011 04:32 ] [ ID #2062307 ]
Linux » gmane.linux.raid » [md PATCH 33/34] MD: raid1s/sysfs_notify_dirent/sysfs_notify_dirent_safe

Vorheriges Thema: [md PATCH 12/36] md/raid1: store behind-write pages in bi_vecs.
Nächstes Thema: [md PATCH 25/34] md: change managed of recovery_disabled.